package cn.edu.sjtu.stap.builder.test;

public aspect BuildTiming {
    public pointcut buildingPc() : execution(* xxbuild*(..));

    private long startTime = 0;

    private long endTime = 0;

    before() : buildingPc() {
        startTime = System.currentTimeMillis();
    }

    after() : buildingPc() {
        endTime = System.currentTimeMillis();
        System.out.println("[ Cost " + ": " + (endTime - startTime) + " ms ].\n MainFunction: "+thisJoinPoint.getSignature());
        System.out.flush();
    }
}
